import { Injectable } from '@angular/core';
import { ReuseTabService } from '@delon/abc';
import { LocalStorage } from '@core/local.storage';

@Injectable({ providedIn: 'root' })

export class ClearLoginService {
  constructor(
    private reuseTabService: ReuseTabService,
    public ls: LocalStorage
  ) { }

  // 清空所有登录状态和用户信息等
  clearAll() {
    this.reuseTabService.clear();
    this.ls.set('loginInfo', 'false');
    this.ls.set('areaInfo', 'false');
    this.ls.set('areaSet', 'false');
    this.ls.set('authorization', 'false');
    this.ls.set('font-adjust', 'false');
    this.ls.set('menuTree', 'false');
    this.ls.set('menuTreeData', 'false');
    this.ls.set('ReuseTabItem', 'false');
  }
}
